$(function(){
	$(".l-box").on("click",function(){
		$(this).addClass("in").siblings().removeClass("in");
	})
})
$(function(){
	$(".l-box").on("click",function(){
		document.title=$(this)[0].innerText;
	})
})
$(function(){ 
	$('.f-inp-s select').each(function(){
		var a=$(this).parent().parent().width();
		$(this).width(a);
	})
}); 
$(function(){ 
	$('.f-inp-s').each(function(){
		if($(this).hasClass('disabled')){
			$(this).children().children().css({'color':'#ccc','cursor':'not-allowed'});
			$(this).children().children()[1].src="img/xiala.png";
		}
	})
	
}); 

$(function(){
	$(".r_main").height($(".con_left").height()-45);
})


$($(".top_list li a").on("click",function(){
	$(this).addClass("active").parent().siblings().children().removeClass("active");
}))

var aa=document.querySelector("iframe");
function Router() {
    this.routes = {};
    this.currentUrl = '';
}
Router.prototype.route = function(path, callback) {
    this.routes[path] = callback || function(){};
};
Router.prototype.refresh = function() {
    this.currentUrl = location.hash.slice(1) || '/';
    this.routes[this.currentUrl]();
};
Router.prototype.init = function() {
    window.addEventListener('load', this.refresh.bind(this), false);
    window.addEventListener('hashchange', this.refresh.bind(this), false);
}
window.Router = new Router();
window.Router.init();	

Router.route('/', function() {
    aa.src="./shgl1.html"
});
Router.route('/shgl1', function() {
    aa.src="./shgl1.html"
});
Router.route('/shgl2', function() {
    aa.src="./shgl2.html"
});